import request from '@/utils/request'

// 查询工序类别列表
export function listType(query) {
  return request({
    url: '/craft/category/list',
    method: 'get',
    params: query
  })
}

// 查询工序类别详细
export function getType(id) {
  return request({
    url: '/craft/category/' + id,
    method: 'get'
  })
}

// 新增工序类别
export function addType(data) {
  return request({
    url: '/craft/category',
    method: 'post',
    data: data
  })
}

// 修改工序类别
export function updateType(data) {
  return request({
    url: '/craft/category',
    method: 'put',
    data: data
  })
}

// 删除工序类别
export function delType(id) {
  return request({
    url: '/craft/category/' + id,
    method: 'delete'
  })
}

// 查询工序父级类别列表
export function listParentCategory() {
  return request({
    url: '/craft/category/listParentCategory',
    method: 'get',
    params: null
  })
}
